package CSR_V3;

class Client extends Thread {

	int d = 0;
	Billeterie b = null;

	Client(Billeterie _b, int _d) {
		b = _b;
		d = _d;
	}

	public void run() {

		try {
			System.out.println("Lancement de l'achat.");
			long start = System.currentTimeMillis();
			b.reservation(d);
			long elapsedTime = System.currentTimeMillis() - start;
			System.out.println(d + " tickets achetes en " + elapsedTime
					+ " ms.");

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

} // Client
